<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%--
  Created by IntelliJ IDEA.
  User: lxf
  Date: 2016/7/20
  Time: 11:56
  To change this template use File | Settings | File Templates.
--%>
<html>
<head>
    <title>Des Demo</title>
    <script src="/static/des.js"></script>
    <script>
        function submitForm() {
            var password = $('#password').val();
            var key1 = 'liuxianfei';
            var passwordEncode = strEnc(password, key1, null, null);
            var passwordDecode = strDec(password, key1, null, null);
            $('#password').val(passwordEncode);
            $("#testForm").submit();
        }
    </script>
</head>
<body>
<form id="testForm">
    <input type="text" id="password">
    <input type="button" id="submit" onclick="submitForm()">
</form>
</body>
</html>
